<%@ page contentType="text/xml;charset=ISO-8859-1" %>
<jsp:useBean id="rssgen" class="com.verbetia.musictrends.service.RssGenerator" />
<%@ page import="com.verbetia.musictrends.persistence.hsqldb.MusicEntity" %>

<% java.util.ArrayList a = rssgen.generateFeed(request.getParameter("u") ); %>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>test listened  music</title>
    <link>http://www.musictrends.com/</link>
    <description>This feed has the Music gipsh have been listening.</description>
    <language>en-us</language>
    <pubDate>2008-04-13 22:28:51</pubDate>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>MusicTrends</generator>
    <image>
      <url>http://www.realfresh.tv/wp-content/uploads/images/2007/11/shamrock.gif</url>
      <title>MusicTrends: your music in feeds</title>
      <link>http://localhost:8080/MusicBrainz/rss.jsp</link>
    </image>
    <ttl>20</ttl>
    <%  if (a!=null)
		   for (int i=0; i!=a.size(); i++) {
		   		
		   		MusicEntity data  = (MusicEntity)a.get(i);
		   %>            
    <item>
      <title><%= data.getArtist() %> - <%= data.getTitle() %> - <%= data.getAlbum() %></title>
      <link>http://www.autolyrics.com/tema1en.php?songname=<%= data.getTitle() %> <%= data.getArtist() %></link>     
      <description>
      &lt;a href=&quot;http://www.autolyrics.com/tema1en.php?songname=<%= data.getTitle() %> <%= data.getArtist() %>&quot; title=&quot;<%= data.getArtist() %>&quot;&gt;&lt;img src=&quot;<%= data.getAmazonid() %>&quot; alt=&quot;<%= data.getAlbum() %>&quot; style=&quot;border: 1px solid #000000;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
      </description>
      <pubDate><%= data.getDateFormated("") %></pubDate>
      <enclosure url="<%= data.getAmazonid() %>"  type="image/jpeg" />      
    </item>    
    <% } %>
  </channel>
</rss>
